package com.binc.testspring.study.applicationEvent;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * FileName: UserController_4
 * Autho: binC
 * Date:  2022/9/9 9:39
 */
@RestController
public class UserController_4 {
    //用户业务逻辑实现
    @Autowired
    private UserService_3 userService;

    /**
     * 注册控制方法
     * @param user 用户对象
     * @return
     */
    @RequestMapping(value = "/register")
    public String register(UserBean_2 user){
        //调用注册业务逻辑
        userService.register(user);
        return "注册成功.";
    }
}
